Skip to content

Fixed disallowed_useragent issue for Google authentication on Android#228

Open
marcioferlan wants to merge 1 commit intofullstackreact:masterfrom
marcioferlan:master
Open

Fixed disallowed_useragent issue for Google authentication on Android#228
marcioferlan wants to merge 1 commit intofullstackreact:masterfrom
marcioferlan:master

Conversation

@marcioferlan
Copy link

Closes #87

This sets the webview User-Agent header to solve the disallowed_useragent issue for Google authentication on Android.

@martin-badin
Copy link

Hello, please merge this fix!

Copy link

@ericchan3721 ericchan3721 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better using the user's actual UserAgent and replace wv from it instead of the hard coded one
mWebView.getSettings().setUserAgentString(mWebView.getSettings().getUserAgentString().replace("; wv", ""));

Ref: https://developers.googleblog.com/2016/08/modernizing-oauth-interactions-in-native-apps.html

P.S. I have open the PR for this issue, however this library seems no longer supported by the original author, you may consider using other OAuth RN library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Android 403: Error: Disallowed Useragent

3 participants